package com.cheng.project_model2.service;

import com.cheng.project_model2.entity.Test;
import com.cheng.project_model2.mapper.TestMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @Author: Cheng
 * @Description:
 * @Date: 2020/9/9 10:51
 */
@Service
public class TestServiceImpl implements TestService {

    @Autowired
    private TestMapper testMapper;


    @Override
    public void insert() {
        testMapper.insert(new Test() {{
            setAmount(20);
            setPaydate(new Date());
        }});
        int i = 1 / 0;
    }
}
